package com.tensquare.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by WF on 2019/9/21 9:52
 * 正在监听使用fanout模式发送过来的消息
 */
@Component
@RabbitListener(queues = "zl-chendu")
public class MyListenerChendu {

    @RabbitHandler
    public void getMessage(String message){
        System.out.println("[zl-chendu队列的消息] :" + message);
    }
}
